package com.zmzncs.lmtc.module.promotion.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zmzncs.lmtc.module.promotion.pojo.month_rule.MonthRuleDTO;
import com.zmzncs.lmtc.module.promotion.pojo.month_rule_fee_scale.MonthRuleFeeScale;
import com.zmzncs.lmtc.module.promotion.pojo.month_rule_fee_scale.MonthRuleFeeScaleDTO;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.math.BigDecimal;
import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author 任建波
 * @since 2020-08-12
 */
@Repository
public interface MonthRuleFeeScaleMapper extends BaseMapper<MonthRuleFeeScale> {

    /**根据停车场id查询普通月租规则收费标准*/
    List<MonthRuleFeeScaleDTO> getMonthRuleFeeScaleByParkId(String parkId);
    /**根据停车场ids查询普通月租规则收费标准*/
    List<MonthRuleFeeScaleDTO> getMonthRuleFeeScaleByParkIds(@Param("parkIds") List<String> parkIds);
    /**根据停车场ids查询普通月租规则收费标准*/
    List<MonthRuleFeeScaleDTO> getMonthRuleFeeScaleByRuleId(Long monthRuleId);
    /**设置所有咪网月租手续费金额 */
//    int updateAllMWMonthServiceAddAmount(BigDecimal serviceAddAmount);

    /**根据停车场ID查询停车场月租规则*/
    List<MonthRuleDTO> getMonthRuleByParkId(Long parkId);

    /**根据月租类型查询*/
    MonthRuleFeeScaleDTO getByMonthRentType(@Param("monthRuleId")Long monthRuleId, @Param("monthRentType")Integer monthRentType);

    /**根据月租统一类型查询*/
    MonthRuleFeeScaleDTO getByUniformRentType(@Param("monthRuleId")Long monthRuleId, @Param("uniformRentType")Integer uniformRentType);

    /**月租规则Id删除信息*/
    void deleteByRuleId(Long ruleId);
}
